package com.omg.persistence.delegate.lifepoint;

import com.ibatis.dao.client.DaoManager;
import com.omg.persistence.dao.lifepoint.DaoConfig;
import com.omg.persistence.dao.lifepoint.entity.LPFriendRelation;
import com.omg.persistence.dao.lifepoint.iface.LPFriendRelationDao;

public class LPFriendRelationDelegate {

	private static volatile LPFriendRelationDelegate instance;
	private LPFriendRelationDao lpFriendRelationDao;
	private static final Object synObj = new Object();

	public static LPFriendRelationDelegate getInstance() {
		if (instance == null) {
			instance = new LPFriendRelationDelegate();
		}
		return instance;
	}

	private LPFriendRelationDelegate() {
		synchronized (synObj) {
			DaoManager daoMgr = DaoConfig.getDaoManager();
			this.lpFriendRelationDao = (LPFriendRelationDao) daoMgr
					.getDao(LPFriendRelationDao.class);
		}
	}

	public int addLPFriendRelation(LPFriendRelation lpFriendRelation) {
		return this.lpFriendRelationDao.addLPFriendRelation(lpFriendRelation);
	}

}
